import Vue from 'vue'
import Router from 'vue-router'
import yqdkTable from "../components/yqdkTable"
import AccountTable from "../components/AccountTable"
import admin from "../components/admin"
import user from "../components/user"
import userInfo from "../components/userInfo"
import yqdkForm from "../components/yqdkForm"
import index from "../components/index"
import updatePass from "../components/updatePass"
import homePage from "../components/homePage"
Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: index
    },
    {
      path: '/admin',
      name: 'admin',
      component: admin,
      children: [
        {
          path: '/homePage',
          component: homePage
        },
        {
          path: '/AccountTable',
          component: AccountTable
        },
        {
          path: '/yqdkTable',
          component: yqdkTable
        },
      ]
    },
    {
      path: '/user',
      name: 'user',
      component: user,
      children: [
        {
          path: '/yqdk',
          component: yqdkForm
        },
        {
          path: '/userInfo',
          component: userInfo
        },
        {
          path: '/updatePass',
          component: updatePass
        },
      ]
    },
  ]
})
